#!/bin/bash

PERFORMANCE_STAT="performance.stat"
TEST_CLS="test.cls"
CLSQUARE_BIN=../../bin/clsquare

if [ $1 -eq 0 ]; then rm -f $PERFORMANCE_STAT; 
echo -e "#     Runs    Cycles \t\t\t    Episode       Crashed       In Goal      End in Goal     In Avoid       Duration     Out Of Goal   Perm. In Goal   Average Reward  Final Reward    Total Cycles     Total Runs" > $PERFORMANCE_STAT
else

echo "Do testing after training sequence: "$1
#call clsquare with the config file for testing
$CLSQUARE_BIN $TEST_CLS
echo -n -e "    "" " $1 "" $2 "\t\t" > tmp
cat tmp >> $PERFORMANCE_STAT
cat test.stat >> $PERFORMANCE_STAT
rm -f tmp
rm -f test.stat

fi
